package Client;

import java.io.*;
import java.net.*;

public class JavaSocketClient {
	public static void main(String[] args){
		try{
			int portNumber = 5001;
			
			Socket sock = new Socket ("localhost", portNumber);
			
			ObjectOutputStream outstream = new ObjectOutputStream(sock.getOutputStream());
			outstream.writeObject("Hello Android");
			outstream.flush();
			
			ObjectInputStream instream = new ObjectInputStream(sock.getInputStream());
			System.out.println(instream.readObject());
			sock.close();
		} catch(Exception ex){
			ex.printStackTrace();
		}//try-catch end
	}//main end
}//class end
